============================================
==========Tusk Datapack for=================
===========Minecraft 1.20+===================
============================================

Contents:
	Overview and background information
	Install istructions
	Usage and abilities guide
	Technical Information
	Tips

--------------------------------------------
Overview and background information
--------------------------------------------
'Tusk' is the stand of Johnny Joestar, the main
character of "Jojo's Bizzare Adventure Part 7: 
Steel Ball Run". A stand is the manifestation of
a person's fighting spirit, though sometimes objects
and animals may have stands as well. Tusk began as
the guardian of the left arm of the 'Holy Corpse,'
the corpes of a saint who had travelled to America
centuries ago. After absorbing the corpse part into himself,
Johnny gains Tusk's abilities for himself, which are
based upon a fundemental in-universe force known as 
'spin'. 
Initially, Johnny is only able to use this 'spin' to 
fire his fingernails like bullets, or use them to cut
things, essentially making his hands two 5 shot revolvers.
However, as the story progresses, Tusk evolves, giving Johnny
greater control over this 'spin,' eventually granting
him access to the 'infinite rpotation,' a source of
infinite energy accessed through Tusk act 4 and 
the usage of a horse. In Jojo canon, Tusk act 4 is 
considered one of the most powerful stands of the series'
34+ year run.

IMPORTANT NOTE: This Datapack has only worked in singleplayer
so far. It will work in multiplayer worlds, but only for sure if
one player has tusk at a time. 
----------------------------------------------
	Install istructions
----------------------------------------------
Instructions for installing are located
in the ReadMe file.
-----------------------------------------------
	Usage and abilities guide
-----------------------------------------------
Obtaining:
Each act of 'Tusk' has a new ability that comes with it,
along with a change to the previous act's abilities.
To obtain 'Tusk', you must first craft and hold the
'Holy Corpse Part'. The crafting recipe is as follows:
	#$#	#=Netherite Scrap
	#%#	$=Diamond Block
	#@#	%=Bone		@=Soul Soil

	(note:Soil Sand will NOT work in place of Soul Soil)
The Holy corpse can only be crafted ONCE per player, so
I'd recommend using it pretty quick, since you will keep Tusk
after death, but not the corpse part if unused.

	A corpse part may also be obtained by collecting a corpse
part from a devil's palm (which spawns naturall if the D4C datapack
is isntalled), then throwing that corpse part on the ground with
two pieces of netherite scrap. 

	Clicking while holding this Tusk corpse part will
give you tusk.

Abilities Guide:

summoning:
In order to use your abilities, you must first summon your stand.
To summon Tusk, you must place the "Tusk act #" item into your
9th inventory slot (furthest right on your hotbar). To de-summon
Tusk, place this item into your off-hand. You can still summon
Tusk even when your stand is "silenced".

Changing Act:
Originally, there were 4 tusk items, and in order to swap acts you
would simply hold the item for the desired act. Now, changing
acts only requires one item.

If you want to change acts, you simply select the tusk item
and right-click. This will move you up one act. If you are currently
at your maximum act when you use this item, then using it will
cause your stand to be "silenced".

When your stand is silenced,
you will not recieve any ability items, and none of your abilities
will work. Silencing your stand allows you to save inventory space,
which was a problem for the original 4-item system. Clicking the
Tusk item when your stand is silenced will bump you up to act 1.

ex) With max act 2:
act 1 => act 2
act 2 => silenced
silenced => act 1

Abilities by Act:

Act 1:

(Passive) Grow spinning nail: every 15 seconds you will grow a nail until 
	you reach a max of 10. In order to use your abilities, you
	must use a nail. Nail's themselve's also have their own special
	properties. Each nail has Sharpness II, allowing them to be used
	as melee weapons. Additionally, at Act III, holding nails will
	grant the user haste III. Drinking milk will automatically grow
	you 4 more nails. This can be used to have over 10 nails at once.

Nail Shot: Fires a nail a max of 60 blocks from the user. The nail
	will damage any mob it hits, but is not strong enough to
	harm boss mobs such as the wither. Nail shots will travel in
	the direction the player is facing, meaning the user can add
	"spin" to their shots by changing their direction after firing.
	This applies to all other abilities as well.

Act 2:

Unlocking: To unlock Act 2, you must gain 40 levels of experience while
	having Tusk 1. 

Nail Shot: At act 2, your nail shot grows stronger and gains an additional
	20 blocks of range. Additionally, entities near the target will
	be teleported to the hit target. This includes the user themselves,
	if they are close enough. 

Nail Shotgun: Act 2's new ability. Fires 3 nails at a medium spread a max 
	distance of 50 blocks away from the user. Does the same amount of
	damage as Tusk 1's nail shot. Can be redirected by the player.

Act 3:

Unlocking: In order to unlock Act 3, you must speak to Jesus Christ himself,
	who will spawn after a set amount of time. When he does appear,
	He will have a glowing effect, making him easy to find so long
	as you are not too far away. Walking up to within a 3 block radius
	of Him will initiate a speech, after which you will recieve Tusk
	Act 3.

(Passive) Nail haste: The user will gain Haste III when holding the Nail
	item. Good for chopping down wood :).

Nail Shot: At act 3, The primary nail shot gains an additional 10 block
	range and the impact teleport radius also increases. Also, Act 3's
	shots are powerful enough to explode on impact, making Act 3's
	primary nail an effective weapon for killing concentrated packs
	of enemies. This ability no longer teleports the user
	. Explosive nail shots are able to harm Boss mobs.

Nail Shotgun: Act 3's nail shotgun gains the explosive properties of it's
	primary nail shot, however without the teleportation or increased range.
	
Spatial Wormhole: Act 3's new nail shot allows the user to teleport a max of 70
	blocks away. If Act 3's spatial wormhole shot hits an entity, it will
	swap the positions of the tusk user and the hit target. The user
	will not be harmed; however, the hit target will take a lot of damage.
	This ability will not damage boss mobs, but will allow you to swap 
	positions with them. This attack's direction will change depending
	on where the player is facing.
	
	(Note: After you use spatial wormhole, you will recieve a resistance V
	effect that will prevent you from taking fall damage or suffocating
	in a wall. If you get stuck, just teleport up. This effect does not 
	last long, so don't rely on it in a fight.)	

Act 4:

Unlocking: To unlock Act 4, you must master horse riding. After a certain amount of
	time on a horse, you will recieve Tusk 4 and unlock the Infinite Rotation.

Nail Shot: At Act 4, Tusk itself finally gets in on the action. Instead of
	a normal nail shot, Act 4 itself will be launched. If the shot hits,
	Act 4 will begin to pummel the hit target, essentially making his
	attack a 1 hit kill so long as you yourself do not die in the process.
	Act 4's rush CAN damage Boss mobs, and is best used in situations with 
	very powerful individual mobs. Act 4's Nail shot also has an increased
	range, and Tusk will continue to hit the target even after you run 
	out of range. This move also explodes upon impact.
	
	Additionally, putting this item into your off-hand will cause tusk to 
	automatically barrage the closest mob to you in a decent sized radius.
	This ability does a tiny amount of knockback in whichever direction the 
	user is facing. Facing towards an enemy will cause tusk to punch them away,
	while facing away will cause tusk to punch them towards you. This knockback
	also applies when tusk's barrage is initiated by a nail shot. This
	is a useful move for when you are low on nail shots, and will not
	target horses.

Golden Shotgun: Act 4's Nail Shotgun is very similar to Act 3's, however
	it has an additional 40 blocks of range.
	
Infinite Rotation: Act 4's most powerful ability. Act 3's spatial wormhole
	is replaced by Act 4's infinite Rotation. When a target is hit by
	Infinite rotation, they will slowly begin to take damage as the
	Infinite rotation spreads throughout their body. Additionally,
	hitting something with the infinite rotation creates a gravity
	well that sucks the affected entity into it, keeping them locked
	in place. If a player is hit by the infinite rotation, they will
	continue to be sucked into the gravity well EVEN AFTER DEATH.
	Only the Act 4 user themselves can cancel this ability.

Cancelling Act 4's Barrage and Infinite Rotation:
	To cancel any of Act 4's abilities, the user can simply 
	change back to any previous act. This will cancel Tusk's
	barrage, and remove any gravity wells created by
	the infintie rotation. Putting the Act 4 barrage item into
	your off-hand will also cancel any previous barrage, but
	not the infinite rotation

-------------------------------------------------------
		Technical Information
-------------------------------------------------------
I included this section for people who are interested
in showing off the datapack, or simply want to explore
it without having to wait for things to spawn. Also
included is a short explanation on how certain abilities
work, just in case something breaks and you may need to fix it.

-This datapack will only function properly in Minecraft 1.20 or the
snapshots leading up to it's release. This is due to the new mobs
that were added in this new snapshot. Acts 1-3 use damage and healing
potion effects to do damage, and the new undead mobs needed to be
accounted for. In the older versions where mobs such as the "Zoglin"
did not exist, the code that does damage will not work, and the entire
.mcfunction file where these lines of code are present will not work.

-All projectiles in this datapack are actually armor stands that are
repeatedly teleported in the direction the user is looking until they
hit something or are a certain distance away, at which point the armor
stand projectile will be killed and a "hit" tag will be applied to
any entity hit depending on which projectile they were hit by.
The only problem with this system is that it does not detect a mob's
full hitbox, but rather their actual position. entities have different
centers that determine their in-game position that do not encessarily
line up perfectly with thier hitbox. Basically, even if your target
has a large hitbox, their position is still only a point, so large entities
like the ender dragon or wither will be very difficult to hit if you
do not know where to aim.

-Jesus' summoning is based on a scoreboard timer called "jesustimer."
Jesus appears once this 'jesustimer' reaches 24000, which is after
20 minutes. The timer then resets to 0, and once it reaches 24000
again it will remove the previous Jesus and spawn another one near you.
You can trigger Jesus's spawn by setting your personal "jesustimer" score to 
23999.

-Obtaining act 4 works in a similar manner. There is a timer called
"horsetimer" that will count up every game tick you are on a horse.
You must ride a horse (or just sit on it if you are boring) for
20 minutes until the horse timer goes from 0 to 24000.

-Firing the Infinite Rotation will always create an armor stand that
acts as the center of the 'gravity well'. If you hit another entity
after missing the first shot, they may be teleported to where the
other armor stand was first created. Switching to Act 3 or below
kills these armor stands, so if you want to be sure that an
entity is fixated where you hit them you can quickly swap acts to 
kill the previous gravity wells.

-The resourcepack changes the look of items already in minecraft,
but does not add any new items or replace old items. It does this using
custom model tags which were added in minecraft 1.13. However, the reskined
items still have their previous functionality. The corpse part is a nether star,
but you can only craft it once, so I wouldn't recommend using it on a beacon. 
Nails are actually iron nuggets, so, if you're willing to just sit and wait 2.25
minutes you will get enough iron nuggets to make an iron bar out of your fingernails.
Chances are, however, that if you were able to obtain netherite, then waiting that much time 
for iron is a waste of time. Abilities are actually Carrot on a Sticks, and 
every Tusk item is actually a glistering melon. If you keep dropping them you can have
infinite carrot on a sticks and glistering melons for whatever that is worth.
But, I will say, if you boil Act 1 in a brewing stand then you
are a sick man.

-Act 4's attack rush targets players and mobs with the tag "tusk4target". 
You can manually give players or any entity this tag if you want tusk to 
attack them, but you can only do this using cheats. This can be cancelled at
any time simply by changing out of act 4. This is useful if you want to watch
the ender dragon get pummeled, but are having trouble hitting it's unusual hitbox
with the nail shot.

----------------------------------------------------
		Tips
----------------------------------------------------
As the person who made this datapack, I have a couple
of tips and tricks for people who are using this datapack.
These include strategies for using Tusk's abilities, or
small bits of information on certain mobs when attacking them.

-Most mobs have their position stored in their feet. It is best
to aim for these kind of mobs' centers to garuntee a hit. 

-Tusk 2 and 3's default nail shot can teleport entities in
a certain radius to any hit entity, which includes arrows
and item frames. It is a viable strategy- especially with act
2- to shoot an arrow over a pit of lava or onto the edge of a cliff
and then hit it with act 2's nail shot. This will then teleport hostile
mobs into an unfortunate position.

-Nail shots all go through walls. You can use act 2's nail shot
or act 3's spatial wormhole to teleport through walls by hitting
an item frame or some other entity on the other side.

-When fighting the Ender dragon, you can use spatial wormhole to swap positions
with the chrystals and get on top of the obsidian towers. This does work, 
however the crystals will not appear to change positions. It is a good idea
to remember where you teleported from in order to properly destroy the
crystal after getting on top of the tower.

-Only explosive nail shots and act 4's barrage will damage crystals. 

-The wither's position is stored near the end of it's
tail/spine(?). Aim there when using acts 3-4 to attack him.

-Entities such as the Wither will not actually drop experience or their 
dropped items when killed by Act 4's barrage or infinite spin. I recommend
finishing it off with an explosive projectile or a melee weapon.

-When dragging an item in your inventory, the datapack will think you
do not have that item, and will give you a duplicate. To negate this,
you can use shift+click to auto move items. Also, if you recieve a duplicate
tusk item you can simply place the duplicate item on to the original and the 
datapack will automatically remove the duplicate, but only if it detects that
you have a stack of 2 tusks.

-Setting "maxact" to 4 on your scoreboard will instantly unlock all acts.
	


	
